package jwdt.xadmin.work.bean;

import jwdt.xadmin.system.bean.TDep;
import jwdt.xadmin.system.bean.TUser;

import com.ezerg.db.Jdb;
import com.ezerg.db.annotation.Column;
import com.ezerg.db.annotation.Table;

@Table(name="t_workreport", keys={"reportid"}, comment="周报管理")
public class TWorkReport implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	@Column(value="reportid", comment="ID")
	private Integer reportid;

	@Column(value="name", comment="名称")
	private String name;
	
	@Column(value="starttime", comment="开始时间")
	private String starttime;
	
	@Column(value="stoptime", comment="结束时间")
	private String stoptime;
	
	@Column(value="content", comment="本周工作")
	private String content;
	
	@Column(value="nextcontent", comment="下周工作")
	private String nextcontent;
	
	@Column(value="addcontent", comment="工作问题和建议")
	private String addcontent;
	
	@Column(value="zt", comment="状态")
	private Integer zt;
	
	@Column(value="userid", comment="创建人")
	private Integer userid;

	@Column(value="depid", comment="部门")
	private Integer depid;

	public Integer getReportid() {
		return reportid;
	}

	public void setReportid(Integer reportid) {
		this.reportid = reportid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getStarttime() {
		return starttime;
	}

	public void setStarttime(String starttime) {
		this.starttime = starttime;
	}

	public String getStoptime() {
		return stoptime;
	}

	public void setStoptime(String stoptime) {
		this.stoptime = stoptime;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getNextcontent() {
		return nextcontent;
	}

	public void setNextcontent(String nextcontent) {
		this.nextcontent = nextcontent;
	}

	public String getAddcontent() {
		return addcontent;
	}

	public void setAddcontent(String addcontent) {
		this.addcontent = addcontent;
	}

	public Integer getZt() {
		return zt;
	}

	public void setZt(Integer zt) {
		this.zt = zt;
	}

	public Integer getUserid() {
		return userid;
	}

	public String getUsername() {
		TUser user = (TUser) Jdb.get().get(TUser.class, this.userid);
		if(user != null) {
			return user.getUsername();
		}
		return "";
	}
	
	public void setUserid(Integer userid) {
		this.userid = userid;
	}

	public Integer getDepid() {
		return depid;
	}

	public void setDepid(Integer depid) {
		this.depid = depid;
	}
	
	public String getDepname() {
		TDep dep = (TDep) Jdb.get().get(TDep.class, this.depid);
		if(dep != null) {
			return dep.getName();
		}
		return "";
	}
	
}
